package com.icinfo.cloud.provider.punish.config.dto;

import cn.hutool.core.collection.CollUtil;
import lombok.Data;

import java.util.HashSet;
import java.util.Set;

/**
 * 自由裁量分页查询catalogId筛选范围dto
 * author: Kexin.Hu
 * date: 2024/3/20 14:40
 */
@Data
public class DiscretionScreenRangeDto {

    /**
     * 仅查询的catalogIds
     */
    private Set<String> catalogIds = new HashSet<>();
    /**
     * 需要排除的catalogIds
     */
    private Set<String> excludesCatalogIds = new HashSet<>();

    /**
     * 如果对象参数为空则返回true
     *
     * @return
     */
    public Boolean isNull() {
        return CollUtil.isEmpty(this.catalogIds) && CollUtil.isEmpty(this.excludesCatalogIds);
    }
}
